// ./models/Chat.js
const mongoose = require('mongoose');

const chatSchema = new mongoose.Schema({
  messageId: String,
  senderId: String,
  receiverId: String,
  content: String,
  mode: String,
  isRead: { type: Boolean, default: false },
  timestamp: { type: Date, default: Date.now }
});

module.exports = mongoose.model('Chat', chatSchema);